<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class TTermreinfo extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('t_TermReInfo', function (Blueprint $table) {
             $table->engine = 'MEMORY';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->increments('tr_index')->nullable(false)->comment('');
			$table->char('tr_DevMac', 65)->nullable(false)->default('00:00:00:00:00:00')->comment('');
			$table->datetime('tr_updatetime')->nullable(false)->comment('');
			$table->integer('tr_TermType')->nullable(false)->comment('');
			$table->unsignedInteger('tr_pdiindex')->nullable(false)->default(0)->comment('');
			$table->unsignedInteger('tr_TermID')->nullable(false)->default(0)->comment('');
			$table->integer('tr_RePort')->nullable(false)->default(0)->comment('');
			$table->string('tr_ReIpAddr', 255)->nullable(false)->default('')->comment('');
			$table->integer('tf_TermCha')->nullable(false)->comment('');
			$table->unique('tr_index', 'pdi_index');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('t_TermReInfo');
    }
}
